package com.linewell.system.utils;

import com.linewell.system.pagemodel.PageHelper;

public class HqlHelper {
	/**
	 * 增加排序的hql
	 * 
	 */
	public static StringBuffer orderHql(StringBuffer hql, PageHelper ph) {
		if (ph.getSort() != null && ph.getOrder() != null) {
			hql.append(" order by t." + ph.getSort() + " " + ph.getOrder());
		}
		return hql;
	}

}
